
SimpleCocoaApp is a small application that is meant to show some of the cool things you can do with Objective-C and Cocoa. For more in-depth learning resources, take a look at the /Developer/Documentation/Cocoa folder. This application displays different "Hello Cocoa" dialogs to the user based upon radio-button and PopUp menu selections. The user can change which hello message is sent by selecting a different radio button. The user can change which Hello object receives the message by changing the PopUp menu selection. The dynamic nature of the Objective-C runtime and the power of Cocoa help make this "on-the-fly" code-swapping possible and the GUI easy to program.There are three classes in this application:- Hello1: Contains implementations of message1, message2, and message3
- Hello2: Contains different implementations of message1, message2, and message3
- HelloController: Handles the data interaction between the GUI and the Hello objects, as well as displaying the ReadMe help file in response to a "SimpleCocoaApp Help" selection from the Help menu
All three classes were first defined in InterfaceBuilder, with skeleton source code being generated using the "Create Files..." feature. Outlet and action connections between the GUI and the above objects were established in MainMenu.nib using InterfaceBuilder. GetInfo strings have been placed in InfoPList.strings and the Application Settings target tab. The action connection to HelloController:showHelp (involved in displaying this help file) was established in InterfaceBuilder. Enjoy!